-- GENERATED SPELL FOR [Gurok the Usurper] --


function spell0_18182(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(23114,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18182', 2331, 1)
end

function spell1_18182(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(22127,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18182', 11500, 1)
end

function spell2_18182(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(32959,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18182', 601, 1)
end

function Sorts_18182(pUnit, Event)
local choix_sorts_18182 = math.random(0, 2)
if choix_sorts_18182 == 0 then
pUnit:RegisterEvent('spell0_18182', 1, 1)
end
if choix_sorts_18182 == 1 then
pUnit:RegisterEvent('spell1_18182', 1, 1)
end
if choix_sorts_18182 == 2 then
pUnit:RegisterEvent('spell2_18182', 1, 1)
end
end

function mob18182_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18182', math.random(1500, 3000), 1)
end

function mob18182_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18182_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18182_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18182, 1, 'mob18182_Action')
RegisterUnitEvent(18182, 2, 'mob18182_Leave')
RegisterUnitEvent(18182, 3, 'mob18182_Kill')
RegisterUnitEvent(18182, 4, 'mob18182_Die')
